/*
 * @Author: your name
 * @Date: 2022-02-24 08:46:40
 * @LastEditTime: 2022-02-24 09:00:11
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \app\src\store\index.js
 */
import Vue from 'vue'
import Vuex from 'vuex'
import axios from 'axios'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    list:[]
  },
  mutations: {
    SET_LIST(state,payload){
   state.list=payload
    }
  },
  actions: {
    async GET_LIST(context){
   const resp=await axios.get("/api/list")
   context.commit('SET_LIST',resp.data.data.data)
    }
  },
  modules: {
  }
})
